package com.classes.attributes.logic;

import java.nio.ByteBuffer;

public class Attribute_lineNumberTable extends AttributeAbstract {

    public Attribute_lineNumberTable(short nameIndex, int attributeLength) {
        super(nameIndex, attributeLength);
    }


    @Override
    public void parse(ByteBuffer buffer) {
        //剩余长度
//		int length = getAttributeLength() - 6;
        //TODO

        short lineNumberTableLength = buffer.getShort();

        for (int i = 0; i < lineNumberTableLength; i++) {
            short startPc = buffer.getShort();
            short lineNumber = buffer.getShort();
            System.out.println("Attribute_lineNumberTable:   字节码行号=" + startPc + "  源码行号=" + lineNumber);
        }

    }


}
